package com.acwing.partition44;

import java.io.*;
import java.util.Arrays;

/**
 * @author `RKC`
 * @date 2022/3/28 9:07
 */
public class AC4381翻转树边 {

    private static final int N = 200010, M = 2 * N;
    private static int[] h = new int[N], e = new int[M], ne = new int[M], w = new int[M];
    private static int[] up = new int[N], down = new int[N];
    private static int n, idx = 0;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        n = Integer.parseInt(reader.readLine());
        Arrays.fill(h, -1);
        for (int i = 0; i < n - 1; i++) {
            String[] ss = reader.readLine().split(" ");
            int a = Integer.parseInt(ss[0]), b = Integer.parseInt(ss[1]);
            add(a, b, 0);
            add(b, a, 1);
        }
        dfsDown(1, -1);
        dfsUp(1, -1);
        int minp = n;
        for (int i = 1; i <= n; i++) minp = Math.min(minp, up[i] + down[i]);
        writer.write(minp + "\n");
        for (int i = 1; i <= n; i++) {
            if (up[i] + down[i] == minp) writer.write(i + " ");
        }
        writer.flush();
    }

    private static void dfsUp(int u, int from) {
        if (from != -1) {
            int father = e[from ^ 1];
            up[u] += up[father] + down[father] - down[u] - w[from] + w[from ^ 1];
        }
        for (int i = h[u]; i != -1; i = ne[i]) {
            if (from == (i ^ 1)) continue;
            int v = e[i];
            dfsUp(v, i);
        }
    }

    private static void dfsDown(int u, int from) {
        for (int i = h[u]; i != -1; i = ne[i]) {
            if (from == (i ^ 1)) continue;
            int v = e[i];
            dfsDown(v, i);
            down[u] += down[v] + w[i];
        }
    }

    private static void add(int a, int b, int c) {
        e[idx] = b;
        ne[idx] = h[a];
        h[a] = idx;
        w[idx++] = c;
    }
}
